package com.lianqi.emcpframework.logging.aop;

import com.lianqi.emcpframework.core.boost.aop.MethodInterceptorHolder;
import com.lianqi.emcpframework.logging.context.LoggerDefinition;

import java.lang.reflect.Method;

/**
 * @program emcp-framework
 * @ClassName InvokingLoggerParser
 * @description: 访问日志转换器接口
 * @author: sky
 * @create: 2018/11/17 16:54
 */
public interface InvokingLoggerParser {
    /**
     * 判断是否支持此转换器
     * @param clazz 方法归属类
     * @param method 方法
     * @return true/false
     */
    boolean support(Class clazz, Method method);

    /**
     * 转换方法
     * @param holder 方法拦截器holder
     * @return 日志定义对象
     */
    LoggerDefinition parse(MethodInterceptorHolder holder);
}
